<?php
/*
 * @Author: Shawn Zhang 
 * @Date: 2019-08-22 15:04:15 
 * @Last Modified by: Shawn Zhang
 * @Last Modified time: 2019-08-22 15:22:38
 * @used-for 将所有en开头的这换成en，将所有zh开头的转换成zh-CN
 */
namespace App\Services\Utils;

class LanguageChecker
{
    public static function languageConvert($language)
    {
        $str_lan = strtolower($language);
        if($language=="")
        {
            return 'zh-CN';
        }elseif(strpos($str_lan,'zh')===0){
            return 'zh-CN';
        }else{
            return 'en';
        }
    }    
}
